import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home';
// import NewList from '../views/NewList.vue';
// import Detail from '../views/goods/detail';
// import Goodsdesc from '../views/Goodsdesc';
// import Goodscomments from '../views/Goodscomments';
import List from '../views/Components/List.vue';
import ListInfo from '../views/Components/ListInfo.vue';
import newContent from '../comments/news/newContent.vue';
import Addgoods from '../views/Addgoods';

Vue.use(VueRouter);

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/member',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/Member')
    },
    {
        path: '/shopcar',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/Shopcar')
    },
    {
        path: '/search',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/Search')
    },
    {
        path: '/goods/detail',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/goods/detail')
    },
    {
        path: '/goodsdesc',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/Goodsdesc')
    },
    {
        path: '/goodscomments',
        component: () =>
            import ( /* webpackChunkName: "login_home_welcome" */ '../views/Goodscomments')
    },
    {
      path: '/list',
      component: List
    },
    {
      path: '/detail/:detailid',
      component: ListInfo
    },
    {
      path: '/news/detail/:detailid',
      component: newContent,
    },
    {
      path: '/addgoods',
      component: () => import( /* webpackChunkName: "login_home_welcome" */ '../views/Addgoods')
    }
  ]

const router = new VueRouter({
    routes
});

export default router;
